home *** CD-ROM | disk | FTP | other *** search
- --------------------------------------------------------------------------------
- -- Weapon Hellfire
- -- Original Carnage Contest Weapon
- -- Script by DC, September 2009, www.UnrealSoftware.de
- --------------------------------------------------------------------------------
-
- -- Setup Tables
- if cc==nil then cc={} end
- cc.hellfire={}
-
- -- Load & Prepare Ressources
- cc.hellfire.gfx_wpn=loadgfx("weapons/hellfire.png") -- Weapon Image
- setmidhandle(cc.hellfire.gfx_wpn)
- cc.hellfire.sfx_attack=loadsfx("hellfire.ogg") -- Hellfire Sound
-
- --------------------------------------------------------------------------------
- -- Weapon: Hellfire
- --------------------------------------------------------------------------------
-
- cc.hellfire.id=addweapon("cc.hellfire","Hellfire",cc.hellfire.gfx_wpn,0,2) -- Add Weapon (0 uses, first in round 2)
-
- function cc.hellfire.draw() -- Draw
- -- do nothing
- end
-
- function cc.hellfire.attack(attack) -- Attack
- if (weapon_shots<=0) then
- if (attack==1) then
- -- No more weapon switching!
- useweapon(0)
- weapon_shots=weapon_shots+1
- -- Effect
- playsound(cc.hellfire.sfx_attack)
- setbgcolor(255,50,0,1.0,0.005)
- -- Fire
- for x=0,getmapwidth(),50 do
- createobject(o_fire,x,-100)
- end
- -- End Turn
- endturn()
- end
- end
- end